import { CssBaseline } from "@mui/material";
import { RouterProvider, createRouter } from "@tanstack/react-router";
import { ThemeProvider } from "providers/theme";

import { routeTree } from "../../routeTree.gen";

const router = createRouter({ routeTree });

import "@fontsource/roboto/300.css";
import "@fontsource/roboto/400.css";
import "@fontsource/roboto/500.css";
import "@fontsource/roboto/700.css";

import "./index.css";

declare module "@tanstack/react-router" {
	interface Register {
		router: typeof router;
	}
}

export const App = () => {
	return (
		<ThemeProvider>
			<CssBaseline />
			<RouterProvider basepath="/" {...{ router }} />
		</ThemeProvider>
	);
};
